<?php 

//$proto = "http" .
//    ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://";
//$server = isset($_SERVER['HTTP_HOST']) ?
//    $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
//$base_url    = $proto . $server.'/';
if($_SERVER['SERVER_PORT'] == '443'){
    $base_url    = 'https://' . $_SERVER['SERVER_NAME'].'/';
}else{
    $base_url    = 'http://' . $_SERVER['SERVER_NAME'].'/';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <base href="<?php echo $base_url; ?>" />
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" media="all" href="css/base.css" />
    <link type="text/css" rel="stylesheet" media="all" href="css/jquery-ui.css" />
    <link type="text/css" rel="stylesheet" media="all" href="css/grid.css" />
    <link type="text/css" rel="stylesheet" media="all" href="css/visualize.css" />
    <title>Login CMDB</title>
</head>
<body>
    <div id="login-wrapper">
        <div class="box-header login">Login CMDB</div>
        <div class="box">
            <?php 
                if ($this->mess){
                    echo '<div class="notification error"><span class="strong">',$this->mess,'</span></div>';
                } 
                echo $this->form; 
            ?>
            <div style="clear: both;"></div>
        </div>
    </div>

</body>
</html>